<?php

namespace  app\classroom\validate;



use think\Validate;

class ClassroomValidate extends  Validate
{

        protected $rule = [
            'school_id' => 'require|gt:0',
            'name' => 'require',
            'rows' => 'require|gt:0',
            'cols' => 'require|gt:0',
        ];

        protected $message = [
            'name.require' => '教室不能为空',
            'rows.require' => '排数不能为空',
            'cols.require' => '列数不能为空',
            'school_id.gt' => '请选择校区',
            'rows.gt' => '请输入正确的排数',
            'cols.gt' => '请输入正确的列数',
        ];

        protected $scene = [
            'add'  => ['name', 'app'],
            'edit' => ['name', 'app'],

        ];

}